package com.digitalgeko.hourreporter.complements;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;

public final class Dialogs {

	public static void okDialog(String message, Context context){
		AlertDialog.Builder builder = new AlertDialog.Builder(context);
		builder.setMessage(message);
		builder.setNeutralButton("OK", new DialogInterface.OnClickListener(){
			public void onClick(DialogInterface dialog, int which) {
				dialog.cancel();
			}			
		});		
		builder.create().show();
	}
	
	public static void finishDialog(String message, Context context, final Activity activity){
		AlertDialog.Builder builder = new AlertDialog.Builder(context);
		builder.setMessage(message);
		builder.setNeutralButton("OK", new DialogInterface.OnClickListener(){
			public void onClick(DialogInterface dialog, int which) {
				dialog.cancel();
				activity.finish();
			}			
		});		
		builder.create().show();
	}
	
}
